package com.swinw.asumall.search.config;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class EkasticSearchConfig {

    @Bean
    public RestHighLevelClient getRestClient(){
        return new RestHighLevelClient(
                RestClient.builder(
//                        HttpHost.create("http://192.168.254.100:9200")
                        new HttpHost("192.168.8.100",9200,"http")
                ));
    }
}
